home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / gfx / pbm / hpcdtoppm_0_6.lha / hpcdtoppm.0.6 / src / config.h < prev    next >
C/C++ Source or Header  |  1994-10-08  |  4KB  |  201 lines

  1. /* hpcdtoppm (Hadmut's pcdtoppm) v0.6
  2. *  Copyright (c) 1992, 1993, 1994 by Hadmut Danisch (danisch@ira.uka.de).
  3. *  Permission to use and distribute this software and its
  4. *  documentation for noncommercial use and without fee is hereby granted,
  5. *  provided that the above copyright notice appear in all copies and that
  6. *  both that copyright notice and this permission notice appear in
  7. *  supporting documentation. It is not allowed to sell this software in 
  8. *  any way. This software is not public domain.
  9. */
  10.  
  11.  
  12.  
  13. /* define OWN_WRITE either here or by compiler-option if you don't want to use
  14.    the pbmplus-routines for writing */
  15. /* #define OWN_WRITE */
  16.  
  17.  
  18.  
  19. /* define DEBUG for some debugging informations */
  20. /* #define DEBUG */
  21.  
  22.  
  23. /* define LONG_HELP or SHORT_HELP, if you want to have an options
  24.    list if parameters are bad */
  25. #define LONG_HELP
  26.  
  27.  
  28. /* define DO_DECL_EXT for external declaration of system and library calls */
  29. /* #define DO_DECL_EXT */
  30.  
  31.  
  32. /* define FASTHUFF for faster Huffman decoding with tables.
  33. ** this makes a little speedup, but needs about 768 KByte memory
  34. */
  35. /* #define FASTHUFF */
  36.  
  37.  
  38.  
  39. #ifdef OWN_WRITE
  40. /* If the own routines are used, this is the size of the buffer in bytes.
  41.    You can shrink if needed. */
  42. #define own_BUsize 50000
  43.  
  44. /* The header for the ppm-files */
  45. #define PPM_Header "P6\n%d %d\n255\n"
  46. #define PGM_Header "P5\n%d %d\n255\n"
  47.  
  48.  
  49. #endif
  50.  
  51.  
  52.  
  53. /* fopen Parameters, for some systems (MS-DOS :-( ) you need "wb" and "rb" */
  54. #define W_OP "w"
  55. #define R_OP "r"
  56.  
  57.  
  58. /* define SMALLNAMES if the filenames of PhotoCD have small letters on 
  59.    your filesystem */
  60. #define SMALLNAMES
  61.  
  62. /* The separator between directory- and filenames */
  63. #define DIRSEP '/'
  64.  
  65.  
  66.  
  67.  
  68.  
  69. /* if you can't write to stdout in binary mode, you have to fdopen
  70.    a FILE * in binary mode to stdout. This is important for system,
  71.    where W_OP is something other than "w". Please define the
  72.    Macro USE_FDOPEN in this case and check the instructions, where this
  73.    macro is used.
  74. */
  75.  
  76. /* #define USE_FDOPEN */
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86. /** Error detection **/
  87.  
  88. #define error(x) eerror(x,__FILE__,__LINE__)
  89.  
  90.  
  91.  
  92. /*
  93. ** Data Types
  94. ** Important: sBYTE must be a signed byte type !
  95. ** If your compiler doesn't understand "signed", remove it.
  96. */
  97.  
  98. #ifndef sBYTE
  99. typedef   signed char sBYTE;
  100. #endif
  101.  
  102. typedef unsigned char uBYTE;
  103.  
  104. /* signed and unsigned 32-bit-integers 
  105. sINT and uINT must at least have 32 bit. If you
  106. don't have 32-bit-integers, take 64-bit and
  107. define the macro U_TOO_LONG !!!
  108.  
  109. uINT and sINT must be suitable to the printf/scanf-format %d
  110. and %u and to the systemcalls as fread etc.
  111.  
  112. */
  113.  
  114. #define uINT  unsigned int
  115. #define sINT           int
  116. /*
  117. #define uLONG unsigned long
  118. #define sLONG unsigned long
  119. */
  120. /* #define U_TOO_LONG */
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127. typedef uINT dim;
  128. typedef sINT sdim;
  129.  
  130.  
  131.  
  132.  
  133. /* Floating point data type and string for sscanf */
  134. #define FLTPT double
  135. #define SSFLTPT "%lf"
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143. /* Default taken when no size parameter given,
  144. ** C_DEFAULT depends on your taste and video-hardware,
  145. */
  146.  
  147. #define S_DEFAULT S_Base16
  148. #define O_DEFAULT O_PPM
  149. #define C_DEFAULT C_LINEAR
  150. #define T_DEFAULT T_AUTO
  151.  
  152.  
  153. /* Background for contact sheet */
  154. #define CONTLUM neutrLum
  155. #define CONTCH1 neutrCh1
  156. #define CONTCH2 neutrCh2
  157.  
  158.  
  159.  
  160.  
  161. /* Maximum Black value of frame for cutting of the
  162. ** frame. If MAX_BLACK is n, a frame is detected, when
  163. ** all Luma values are within [ 0 .. (n-1) ]
  164. */
  165. #define MAX_BLACK 1
  166.  
  167. /* Default Postscript paper size
  168. ** (German DIN A 4 )
  169. */
  170. #define DEF_PAPER_LEFT    50.0
  171. #define DEF_PAPER_BOTTOM  50.0
  172. #define DEF_PAPER_WIDTH  500.0
  173. #define DEF_PAPER_HEIGHT 750.0
  174. #define DEF_DPI          300.0
  175.  
  176.  
  177.  
  178. /* External Declarations */
  179. #ifdef DO_DECL_EXT
  180.  
  181. /*extern void *malloc(unsigned);*/
  182. extern int  sscanf(char *,char *,...);    
  183.  
  184. extern int  fprintf(FILE *,char *,...);
  185. extern int  fclose(FILE *);
  186. extern int  fseek(FILE *,long,int);
  187. extern int  fread(void *,int,int,FILE *);
  188. extern int  fwrite(void *,int,int,FILE *);
  189. extern int  fputs(char *,FILE *);
  190. extern int  fputc(char  ,FILE *);
  191. extern int  fflush(FILE *);
  192.  
  193. #endif
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.